<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="../static/jquery-easyui-1.5.5.3/jquery.min.js"></script>
	<link rel="stylesheet" href="../webjars/bootstrap/3.3.7-1/css/bootstrap.css" >
	<link rel="stylesheet" href="../static/jquery-easyui-1.5.5.3/themes/material-teal/easyui.css" />
	<link rel="stylesheet" href="../static/jquery-easyui-1.5.5.3/themes/icon.css" />
	<script type="text/javascript" src="../static/jquery-easyui-1.5.5.3/jquery.easyui.min.js"></script>
	<script type="text/javascript" src="../static/jquery-easyui-1.5.5.3/locale/easyui-lang-zh_CN.js"></script>
	<script type="text/javascript" src="../webjars/bootstrap/3.3.7-1/js/bootstrap.js"></script>
	<script>
		function relieve(id){
			var f = confirm("解封期限为3天，联系读者立即还书,否则继续封锁！");
			if(f){
				$.ajax({
					type:'post',
					url:'relieve',
					data:{id:id},
					  success: function (data) {
						  alert(data); 
						  window.location.reload();
					  }
				});
			}else{
				return false;
			}
		}
	</script>
</head>
<body>
<table  style="width: 100%"  class="table table-striped">
	<tr>
		<th>姓名</th>
		<th>联系方式</th>
		<th>联系电话</th>
		<th>图书</th>
		<th>借书时间</th>
		<th>还书时间</th>
		<th>违约</th>
		<th>操作</th>
	</tr>
	<tr th:each="f:${findAll}">
		<td th:text="${f.borrowedName}"></td>
		<td th:text="${f.contactWay}"></td>
		<td th:text="${f.contactPhone}"></td>
		<td th:text="${f.book}"></td>
		<td th:text="${f.date}"></td>
		<td th:text="${f.endDate}"></td>
		<td>违约</td>
		<td>
			<a href="#" th:onclick="'javascript:relieve(\''+${f.id}+'\')'">解封</a>
		</td>
	</tr>
</table>
</body>
</html>